Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _polyprep, PolynomialRatio, for Number args #571

Merged
merged 12 commits into from
Oct 29, 2024

Conversation

wheeheee
Copy link
Contributor

@wheeheee wheeheee commented Oct 19, 2024

The current implementation uses reverse(x), which is a method error for Number arguments. Thus PolynomialRatio(::Number, ::Number) doesn't work as currently documented. This commit also reduces runtime dispatch. edit: guess it doesn't because of all the inlining anyway
2nd edit: it wasn't, but now the type instabilities have been removed by manually inlining _polyprep

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.40%. Comparing base (4ff6208) to head (a4cfd09).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #571   +/-   ##
=======================================
  Coverage   97.40%   97.40%           
=======================================
  Files          16       16           
  Lines        3193     3193           
=======================================
  Hits         3110     3110           
  Misses         83       83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@martinholters martinholters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good to me, but I'd like to see some justification for why
PolynomialRatio{:z,T}(b::Union{T1,Vector{<:T1}}, a::Union{T2,Vector{<:T2}}) where {T<:Number,T1<:Number,T2<:Number}has to be some complicated.

src/Filters/coefficients.jl Outdated Show resolved Hide resolved
src/Filters/coefficients.jl Outdated Show resolved Hide resolved
wheeheee and others added 2 commits October 28, 2024 22:27
Co-authored-by: Martin Holters <[email protected]>
Co-authored-by: Martin Holters <[email protected]>
Copy link
Member

@martinholters martinholters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo minor style nits. Thanks!

src/Filters/coefficients.jl Outdated Show resolved Hide resolved
src/Filters/coefficients.jl Outdated Show resolved Hide resolved
Co-authored-by: Martin Holters <[email protected]>
@martinholters martinholters merged commit dcef684 into JuliaDSP:master Oct 29, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants